package com.zq.it.cms.common;

import com.zq.it.cms.domain.User;

/**
 * @author zhengqiang
 * @description 上下文
 */
public class Context {
	
	private static ThreadLocal<User> userHolder = new ThreadLocal<User>();
	
	public static void setCurrentUser(User user) {
		userHolder.set(user);
	}

	public static User getCurrentUser() {
		return userHolder.get();
	}
	
	public static void resetCurrentUser() {
		userHolder.remove();
	}
}
